package com.hymall.bean.vo;

import com.github.pagehelper.PageInfo;
import com.hymall.bean.MarketCategory;
import com.hymall.bean.MarketGoods;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author: 章鹏
 * @description 商品列表
 * @date: 2022/7/20 11:36
 */
@NoArgsConstructor
@Data
public class WxGoodsListVO {

    /**
     * total : 56
     * pages : 6
     * limit : 10
     * page : 1
     * list : [{"id":1181089,"name":"水杯啊啊啊啊","brief":"水杯","picUrl":"http://182.92.235.201:8083/wx/storage/fetch/5qxpab7onxv5wyg0d663.jpg","isNew":true,"isHot":false,"counterPrice":30,"retailPrice":20},{"id":1181088,"name":"心如刀哥","brief":"这是简介","picUrl":"http://182.92.235.201:8083/wx/storage/fetch/bsdb1389biegtjfttutu.jpg","isNew":true,"isHot":true,"counterPrice":450,"retailPrice":450},{"id":1181087,"name":"52435324","brief":"13421","picUrl":"","isNew":true,"isHot":false,"counterPrice":5324532,"retailPrice":1},{"id":1181084,"name":"卡卡","brief":"请求","picUrl":"http://182.92.235.201:8083/wx/storage/fetch/8kuieh1zfg1y43i4eiak.jpg","isNew":true,"isHot":true,"counterPrice":15,"retailPrice":11},{"id":1181083,"name":"女装","brief":"","picUrl":"http://182.92.235.201:8083/wx/storage/fetch/nxu8o883zqaoiv74pnun.jpg","isNew":true,"isHot":false,"counterPrice":0,"retailPrice":100},{"id":1181082,"name":"测试海报","brief":"好","picUrl":"http://182.92.235.201:8083/wx/storage/fetch/f8z2quco8mjj9lsin93k.jpg","isNew":true,"isHot":false,"counterPrice":8888,"retailPrice":0},{"id":1181081,"name":"312312534","brief":"3123","picUrl":"","isNew":true,"isHot":false,"counterPrice":312312,"retailPrice":0},{"id":1181080,"name":"312312","brief":"大萨达大","picUrl":"","isNew":true,"isHot":false,"counterPrice":312312,"retailPrice":0},{"id":1181078,"name":"afdadfadsf","brief":"","picUrl":"http://182.92.235.201:8083/wx/storage/fetch/nxmt5zsmtdlxp1xfet8q.jpg","isNew":true,"isHot":true,"counterPrice":-1,"retailPrice":0},{"id":1181074,"name":"测试","brief":"","picUrl":"http://182.92.235.201:8083/wx/storage/fetch/11wac77yg3gawtn076xm.jpg","isNew":true,"isHot":false,"counterPrice":200,"retailPrice":100}]
     * filterCategoryList : [{"id":1005007,"name":"锅具","keywords":"铁锅炖大鹅","desc":"一口好锅，炖煮生活一日三餐","pid":1005001,"iconUrl":"http://yanxuan.nosdn.127.net/4aab4598017b5749e3b63309d25e9f6b.png","picUrl":"http://yanxuan.nosdn.127.net/d2db0d1d0622c621a8aa5a7c06b0fc6d.png","level":"L2","sortOrder":1,"addTime":"2018-02-01 00:00:00","updateTime":"2022-07-17 12:22:33","deleted":false},{"id":1005009,"name":"清洁","keywords":"","desc":"环保便利，聪明之选","pid":1005001,"iconUrl":"http://yanxuan.nosdn.127.net/e8b67fe8b8db2ecc2e126a0aa631def0.png","picUrl":"http://yanxuan.nosdn.127.net/3a40faaef0a52627357d98ceed7a3c45.png","level":"L2","sortOrder":9,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1005011,"name":"小食","keywords":"","desc":"原香鲜材，以小食之味，带来味蕾惊喜","pid":1005002,"iconUrl":"http://yanxuan.nosdn.127.net/663f568475c994358bf31bcb67d122fe.png","picUrl":"http://yanxuan.nosdn.127.net/418f86049f957108a31ad55cec42c349.png","level":"L2","sortOrder":2,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1005012,"name":"食材","keywords":"","desc":"天时地利人和，寻找这个时节这个地点的味道","pid":1005002,"iconUrl":"http://yanxuan.nosdn.127.net/e050980992725b7932bb3645fe5aec08.png","picUrl":"http://yanxuan.nosdn.127.net/80db363e0687b1a65edc6e75c1b99726.png","level":"L2","sortOrder":10,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1007000,"name":"杯壶","keywords":"","desc":"精工生产制作，匠人手艺","pid":1005001,"iconUrl":"http://yanxuan.nosdn.127.net/0b244d3575b737c8f0ed7e84c5c4abd2.png","picUrl":"http://yanxuan.nosdn.127.net/ec53828a3814171079178a59fb2593da.png","level":"L2","sortOrder":2,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1008002,"name":"布艺软装","keywords":"1111111","desc":"各种风格软装装点你的家","pid":1005000,"iconUrl":"http://yanxuan.nosdn.127.net/8bbcd7de60a678846664af998f57e71c.png","picUrl":"http://yanxuan.nosdn.127.net/2e2fb4f2856a021bbcd1b4c8400f2b06.png","level":"L2","sortOrder":6,"addTime":"2018-02-01 00:00:00","updateTime":"2022-07-15 16:46:43","deleted":false},{"id":1008003,"name":"鞋","keywords":"","desc":"一双好鞋，才能带你到远方","pid":1008000,"iconUrl":"http://yanxuan.nosdn.127.net/4316c2d05745bc90d1f333e363e571bd.png","picUrl":"http://yanxuan.nosdn.127.net/85566d138ea55e6aaeda2cda02df66f8.png","level":"L2","sortOrder":4,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1008007,"name":"围巾件套","keywords":"","desc":"围上它，你的造型才完整","pid":1008000,"iconUrl":"http://yanxuan.nosdn.127.net/3a8c7ae5b9dc5c1c4b7f2b656abb0279.png","picUrl":"http://yanxuan.nosdn.127.net/6beb3fd67106e42dc0f026b173373d16.png","level":"L2","sortOrder":7,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1008008,"name":"被枕","keywords":"","desc":"守护你的睡眠时光","pid":1005000,"iconUrl":"http://yanxuan.nosdn.127.net/927bc33f7ae2895dd6c11cf91f5e3228.png","picUrl":"http://yanxuan.nosdn.127.net/b43ef7cececebe6292d2f7f590522e05.png","level":"L2","sortOrder":2,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1008009,"name":"床品件套","keywords":"","desc":"MUJI等品牌制造商出品","pid":1005000,"iconUrl":"http://yanxuan.nosdn.127.net/243e5bf327a87217ad1f54592f0176ec.png","picUrl":"http://yanxuan.nosdn.127.net/81f671bd36bce05d5f57827e5c88dd1b.png","level":"L2","sortOrder":4,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1008010,"name":"拖鞋","keywords":"","desc":"穿上拖鞋，回到自我","pid":1008000,"iconUrl":"http://yanxuan.nosdn.127.net/1121696544ed9b0c2a70e82f1088fa0e.png","picUrl":"http://yanxuan.nosdn.127.net/984ddb9671aab41651784ba55b2cbdcf.png","level":"L2","sortOrder":6,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1008015,"name":"糕点","keywords":"","desc":"四季糕点，用心烘焙","pid":1005002,"iconUrl":"http://yanxuan.nosdn.127.net/93168242df456b5f7bf3c89653b3db76.png","picUrl":"http://yanxuan.nosdn.127.net/66ea1d6ad602a8e441af7cada93bdc7a.png","level":"L2","sortOrder":1,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1011001,"name":"妈咪","keywords":"","desc":"犬印、Harvest Hills制造商","pid":1011000,"iconUrl":"http://yanxuan.nosdn.127.net/720aebaa529df9391b95a078dfb2fd5c.png","picUrl":"http://yanxuan.nosdn.127.net/844e2f4dce94f71283840c141d4ca71b.png","level":"L2","sortOrder":2,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1012003,"name":"文具","keywords":"","desc":"找回书写的力量","pid":1012000,"iconUrl":"http://yanxuan.nosdn.127.net/e1743239e41ca9af76875aedc73be7f0.png","picUrl":"http://yanxuan.nosdn.127.net/e074795f61a83292d0f20eb7d124e2ac.png","level":"L2","sortOrder":1,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1020003,"name":"服饰","keywords":"","desc":"萌宝穿搭，柔软舒适触感","pid":1011000,"iconUrl":"http://yanxuan.nosdn.127.net/4e50f3c4e4d0a64cd0ad14cfc0b6bd17.png","picUrl":"http://yanxuan.nosdn.127.net/004f5f96df4aeb0645abbd70c0637239.png","level":"L2","sortOrder":1,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1020005,"name":"寝居","keywords":"","desc":"无荧光剂，婴幼儿A类标准","pid":1011000,"iconUrl":"http://yanxuan.nosdn.127.net/0f3c5ad63139096fd0760219e12149af.png","picUrl":"http://yanxuan.nosdn.127.net/476995896abea91d3f2e9ec20d56bd8d.png","level":"L2","sortOrder":3,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1020006,"name":"玩具","keywords":"","desc":"萌宝童趣必备","pid":1011000,"iconUrl":"http://yanxuan.nosdn.127.net/7aac7c5819f71345a52a4b9df23d6239.png","picUrl":"http://yanxuan.nosdn.127.net/34b3267efcddad09cd652f181d87aab0.png","level":"L2","sortOrder":4,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1022000,"name":"数码","keywords":"","desc":"智能硬件，匠心出品","pid":1008000,"iconUrl":"http://yanxuan.nosdn.127.net/3ec003761d346bc866de2ec249d7ff19.png","picUrl":"http://yanxuan.nosdn.127.net/c33b13875a86da535c935e3d454a6fd2.png","level":"L2","sortOrder":9,"addTime":"2018-02-01 00:00:00","updateTime":"2018-02-01 00:00:00","deleted":false},{"id":1036063,"name":"混元功法","keywords":"","desc":"松活弹抖闪电鞭","pid":1036062,"iconUrl":"http://182.92.235.201:8083/wx/storage/fetch/7emo3z85jyaz03s7fvis.jpg","picUrl":"http://182.92.235.201:8083/wx/storage/fetch/9gxgwp437dnwzxudhgoq.jpg","level":"L2","sortOrder":50,"addTime":"2022-07-19 12:02:53","updateTime":"2022-07-19 12:02:53","deleted":false},{"id":1036064,"name":"钟测试","keywords":"","desc":"","pid":1036039,"iconUrl":"","picUrl":"","level":"L2","sortOrder":50,"addTime":"2022-07-19 16:15:12","updateTime":"2022-07-19 16:15:12","deleted":false}]
     */

    private int total;
    private int pages;
    private int limit;
    private int page;
    private List<MarketGoods> list;
    private List<MarketCategory> filterCategoryList;


    public static WxGoodsListVO data(PageInfo pageInfo) {
        WxGoodsListVO data = new WxGoodsListVO();
        data.setTotal((int) pageInfo.getTotal());
        data.setPages(pageInfo.getPages());
        data.setPage(pageInfo.getPageNum());
        data.setLimit(pageInfo.getPageSize());
        data.setList(pageInfo.getList());
        return data;
    }
}
